home *** CD-ROM | disk | FTP | other *** search
- <HTML>
-
- <HEAD>
-
- <TITLE>scripting position - communicator</TITLE>
-
- </HEAD>
-
- <SCRIPT LANGUAGE="JavaScript">
-
- function random (limit)
-
- {
-
- return (Math.round(((Math.random())*1000))%limit)+1;
-
- }
-
- function moveElement()
-
- {
-
- document.layers['movingElement'].left=random(300);
-
- document.layers['movingElement'].top=random(300);
-
- }
-
- </SCRIPT>
-
- <STYLE TYPE="text/css">
-
- .comeAlong{
-
- POSITION: absolute;
-
- TOP: 100px;
-
- LEFT: 100px;
-
- }
-
- </STYLE>
-
- <BODY BGCOLOR="#ffffff">
-
-
-
- <DIV ID="movingElement" CLASS="comeAlong">
-
- <FORM>
-
- <INPUT TYPE=BUTTON VALUE="you move me" ONCLICK="moveElement()">
-
- </FORM>
-
- </DIV>
-
- </BODY>
-
- </HTML>
-
-